import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_yn_goods/config/app_color.dart';
import 'package:flutter_yn_goods/config/app_config.dart';
import 'package:flutter_yn_goods/config/app_translations.dart';
import 'package:flutter_yn_goods/generated/assets.dart';
import 'package:flutter_yn_goods/widgets/appbar/common_app_bar.dart';
import 'package:flutter_yn_goods/widgets/image/auto_image.dart';
import 'package:get/get.dart';

import 'about_us_logic.dart';

class AboutUsPage extends StatelessWidget {
  AboutUsPage({Key? key}) : super(key: key);

  final logic = Get.put(AboutUsLogic());
  final state = Get.find<AboutUsLogic>().state;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CommonAppBar(
        title: LocaleKeys.about_us.tr,
      ),
      body: SizedBox(
        width: double.infinity,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.center,
          mainAxisSize: MainAxisSize.min,
          children: [
            40.verticalSpaceFromWidth,
            AutoImage(Assets.appLogo,width: 80.w,),
            // Container(
            //   alignment: Alignment.center,
            //   width: 80.w,
            //   height: 80.w,
            //   // decoration: BoxDecoration(
            //   //   color: AppColor.color282828,
            //   //   borderRadius: BorderRadius.circular(26.w),
            //   // ),
            //   // child: AutoImage(
            //   //   Assets.logoONEWhite,
            //   //   width: 42.w,
            //   //   height: 15.w,
            //   // ),
            // ),
            12.verticalSpaceFromWidth,
            Text(
              AppConfig.appName,
              style: TextStyle(
                color: AppColor.color282828,
                fontWeight: FontWeight.w600,
                fontSize: 16.sp,
                height: 1.5,
              ),
            ),
            Obx(() {
              var text = state.versionStr.value;
              if (text.isNotEmpty) {
                text = "V $text";
              }
              return Text(
                text,
                style: TextStyle(
                  color: AppColor.color999999,
                  fontWeight: FontWeight.w400,
                  fontSize: 14.sp,
                  height: 1.5,
                ),
              );
            }),
          ],
        ),
      ),
    );
  }
}
